package com.dinzeer.legendreliclib.lib.compat.slashblade.entity.swordrain;

import com.dinzeer.legendreliclib.lib.compat.slashblade.SlashBladeCompatEntities;
import mods.flammpfeil.slashblade.SlashBlade;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.EntityType;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.level.Level;
import net.minecraft.world.phys.AABB;
import net.minecraft.world.phys.Vec3;
import net.minecraftforge.network.PlayMessages;

import java.util.Comparator;
import java.util.Optional;

/**
 * DelayedTrackingSwordRainEntity 是 SwordRainEntity 的子类，
 * 实现生成后自动朝向 owner 的朝向，停留三秒后再追踪目标的功能。
 */
public class DelayedTrackingSwordRainEntity extends BaseSwordRainEntity {



    public DelayedTrackingSwordRainEntity(EntityType<DelayedTrackingSwordRainEntity> entityTypeIn, Level worldIn) {
        super(entityTypeIn, worldIn);
    }

    /**
     * 创建实体实例。
     *
     * @param packet  生成数据包
     * @param worldIn 所在世界
     * @return 延迟追踪剑雨实体实例
     */
    public static DelayedTrackingSwordRainEntity createInstance(PlayMessages.SpawnEntity packet, Level worldIn) {
        return new DelayedTrackingSwordRainEntity(SlashBladeCompatEntities.Delayed_Tracking_Sword_Rain.get(), worldIn);
    }

}